package com.zyl.util;

import android.content.Context;
import android.content.SharedPreferences;

public class SharedPreferencesUtil {
	public static int getLow(Context paramContext) {
		return paramContext.getSharedPreferences(
				"com.zyl.widget.WidgetProvider", 0).getInt(
				"low", 0);
	}

	public static int getHigh(Context paramContext) {
		return paramContext.getSharedPreferences(
				"com.zyl.widget.WidgetProvider", 0).getInt(
				"high", 0);
	}

	public static void saveSetting(Context paramContext, String high, String low) {
		SharedPreferences.Editor localEditor = paramContext
				.getSharedPreferences(
						"com.zyl.widget.WidgetProvider", 0)
				.edit();

		try {
			localEditor.putInt("high", Integer.parseInt(high));
			localEditor.putInt("low", Integer.parseInt(low));
		} catch (NumberFormatException e) {
		}
		localEditor.commit();
	}

}
